package com.navi.loaddata.core.gpEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.sql.Timestamp;

public class WppCdefectPanelSumPK implements Serializable {
    private Timestamp evtTimestamp;
    private String jgeCnt;
    private String opeId;
    private String glassGrade;
    private String glassRejCode;

    @Column(name = "evt_timestamp")
    @Id
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Column(name = "jge_cnt")
    @Id
    public String getJgeCnt() {
        return jgeCnt;
    }

    public void setJgeCnt(String jgeCnt) {
        this.jgeCnt = jgeCnt;
    }

    @Column(name = "ope_id")
    @Id
    public String getOpeId() {
        return opeId;
    }

    public void setOpeId(String opeId) {
        this.opeId = opeId;
    }

    @Column(name = "glass_grade")
    @Id
    public String getGlassGrade() {
        return glassGrade;
    }

    public void setGlassGrade(String glassGrade) {
        this.glassGrade = glassGrade;
    }

    @Column(name = "glass_rej_code")
    @Id
    public String getGlassRejCode() {
        return glassRejCode;
    }

    public void setGlassRejCode(String glassRejCode) {
        this.glassRejCode = glassRejCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WppCdefectPanelSumPK that = (WppCdefectPanelSumPK) o;

        if (evtTimestamp != null ? !evtTimestamp.equals(that.evtTimestamp) : that.evtTimestamp != null) return false;
        if (jgeCnt != null ? !jgeCnt.equals(that.jgeCnt) : that.jgeCnt != null) return false;
        if (opeId != null ? !opeId.equals(that.opeId) : that.opeId != null) return false;
        if (glassGrade != null ? !glassGrade.equals(that.glassGrade) : that.glassGrade != null) return false;
        if (glassRejCode != null ? !glassRejCode.equals(that.glassRejCode) : that.glassRejCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = evtTimestamp != null ? evtTimestamp.hashCode() : 0;
        result = 31 * result + (jgeCnt != null ? jgeCnt.hashCode() : 0);
        result = 31 * result + (opeId != null ? opeId.hashCode() : 0);
        result = 31 * result + (glassGrade != null ? glassGrade.hashCode() : 0);
        result = 31 * result + (glassRejCode != null ? glassRejCode.hashCode() : 0);
        return result;
    }
}
